//调用接口配置文件
import { request } from "config/request";
import config from "config/config";
import axios from "axios";
//城市与区域级联
export async function regionArea(params) {
  console.log(params);
  return request({
    url: `admin/qrcode/region/area/tree/get`,
    method: "GET",
    data: params,
    headers: {
      "Content-type": "application/json",
    },
  });
}

//根据城市查询项目
export async function getProduct(params) {
  console.log(params);
  return request({
    url: `admin/qrcode/products/by-city`,
    method: "GET",
    data: params,
    headers: {
      "Content-type": "application/json",
    },
  });
}
//导出
export async function down(params) {
  console.log(params);
  return request({
    url: `3rd/commissionInvoice/exportCommissionInvoiceDetail`,
    method: "POST",
    data: params,
  });
}
// 下载
export async function dowmfa(id) {
  return axios.get(
    `${config.baseUrl}3rd/commissionInvoice/downloadCommissionInvoice/${id}`,
    { headers: {responseType: 'blob'} }
  );
}